<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page trimDirectiveWhitespaces="true"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

<div class="widget-box">
	<div class="widget-header header-color-pink">
		<h5>
			<i class="icon-edit"></i>超声波液位仪
		</h5>

		<div class="widget-toolbar no-border">
			[录入高度值均为相对于水准尺零点的垂直高度]
		</div>
		<button style="float:right;margin-top:5px;margin-right:5px;" id="export" onclick="exportExcel('/export/ultrasonic');" class="btn btn-xs bigger btn-yellow dropdown-toggle">
			<i class="icon-download-alt"> 导出Excel</i>
		</button>
	</div>

	<div class="widget-body">
		<div class="widget-main">

			<form class="form-horizontal" id="ultrasonicForm" action="" method="post">

				<div class="space-4"></div>

				<div class="form-group">
					<label class="col-sm-2 control-label no-padding-right"> 编号 </label>
					<div class="col-sm-3">
						<input type="text" name="code" id="code" value="${ultrasonic.code}" placeholder="传感器编号 必填" class="col-xs-5 col-sm-12" />
					</div>

					<label class="col-sm-2 control-label no-padding-right"> 名称 </label>
					<div class="col-sm-3">
						<input type="text" name="name" id="name" value="${ultrasonic.name}" placeholder="传感器名称 必填" class="col-xs-5 col-sm-12" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label no-padding-right"> 最小干滩长度 </label>
					<div class="col-sm-3">
						<input type="text" name="len" id="len" value="${ultrasonic.len}" placeholder="最小干滩长度 必填" class="col-xs-5 col-sm-12" />
					</div>

					<label class="col-sm-2 control-label no-padding-right"> 最小干滩长度处水位线 </label>
					<div class="col-sm-3">
						<input type="text" name="lenh" id="lenh" value="${ultrasonic.lenh}" placeholder="最小干滩长度处标高 必填" class="col-xs-5 col-sm-12" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label no-padding-right"> 安装位置 </label>
					<div class="col-sm-3">
						<input type="text" name="pxy" id="pxy" readonly="readonly" value="${ultrasonic.pxy}" placeholder="安装位置 必填" class="col-xs-5 col-sm-12" />
					</div>

					<label class="col-sm-2 control-label no-padding-right"> 状态 </label>
					<div class="col-sm-3">
						<select name="state" id="state" class="col-xs-5 col-sm-12 required" title="必选">
							<option value="0" <c:if test="${ultrasonic.state==0}">selected="selected"</c:if>>启用</option>
							<option value="1" <c:if test="${ultrasonic.state==1}">selected="selected"</c:if>>禁用</option>
						</select>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-sm-2 control-label no-padding-right"> 一级报警参数 (cm)</label>
					<div class="col-sm-3">
						<input type="text" name="level1" id="level1" value="${ultrasonic.level1}" placeholder="一级报警参数 必填" class="col-xs-5 col-sm-12" />
					</div>

					<label class="col-sm-2 control-label no-padding-right"> 二级报警参数(cm) </label>
					<div class="col-sm-3">
						<input type="text" name="level2" id="level2" value="${ultrasonic.level2}" placeholder="二级报警参数 必填" class="col-xs-5 col-sm-12" />
					</div>
				</div>

				<div class="form-group">
					<label class="col-sm-2 control-label no-padding-right"> 安装处标高(cm) </label>
					<div class="col-sm-3">
						<input type="text" name="height" id="height" value="${ultrasonic.height}" placeholder="液位到水底的距离 必填" class="col-xs-5 col-sm-12" />
					</div>
				</div>

				<div class="clearfix form-actions">
					<c:if test="${sessionScope['ABKJ-PT-ACCOUNT'].type ==1}">
						<div class="col-md-offset-4 col-md-8">
							<button class="btn btn-info" type="button" onclick="form_submit('ultrasonicForm','/sensor/ultrasonic_saveOrUpdate', '监测点管理-超声波液位仪');">
								<i class="icon-ok bigger-110"></i> 保存
							</button>
							&nbsp; &nbsp; &nbsp;
							<button class="btn btn-info" type="button" onclick="sensor_zero('${ultrasonic.code}','ultrasonic',1,0);">
								<i class="icon-ok bigger-110"></i> 调零
							</button>
							&nbsp; &nbsp; &nbsp;
							<button onclick="trans2('/sensor/ultrasonic');" class="btn" type="reset">
								<i class="icon-undo bigger-110"></i> 取消
							</button>
						</div>
					</c:if>
				</div>

				<input id="id" type="hidden" name="id" value="${ultrasonic.id}" />
			</form>

		</div>

	</div>
</div>
<script type="text/javascript">
	function exportExcel(urlStr){
		var url = "/tail/" + urlStr;
		window.open(url);
	}
</script>
<jsp:include page="../../pxy.jsp"></jsp:include>